export type ProjectMetrics = {
  today: number;
  week: number;
  month: number;
};

export type ProjectSummary = {
  id: string;
  name: string;
  description?: string | null;
  managerName?: string | null;
  monthlyTarget?: number | null;
  currentValue?: number | null;
  progressPercentage?: number | null;
  metrics: ProjectMetrics;
};

export type OutputRecord = {
  id: string;
  projectId: string;
  projectName: string;
  reporterId: string;
  reporterName: string;
  date: string;
  value: number;
  note?: string | null;
};

export type PaginationMeta = {
  total: number;
  page: number;
  pageSize: number;
  pageCount: number;
};

export type OutputsPaginated = {
  items: OutputRecord[];
  meta: PaginationMeta;
};

export type ProjectDetail = ProjectSummary & {
  isActive: boolean;
  createdAt?: string;
  updatedAt?: string;
  recentOutputs: OutputRecord[];
};

export type DailyOutputSummary = OutputRecord;

export type CreateOutputPayload = {
  projectId: string;
  value: number;
  date: string;
  note?: string;
};
